from typing import List

from src import KeyFunc
from src.util.scp_util import scp_entrance
from src.train import FlowPipline, TrainParam
from src.update import update_entrance
from src.util.common_util import loop_exe



def train():
    FlowPipline.run()

def predict():
    p=TrainParam()
    p.is_train=False
    FlowPipline.run( params=p)
if __name__ == "__main__":
    map_list: List[KeyFunc] = [
        KeyFunc(key='[训练]', func=train),
        KeyFunc(key='[预测]', func=predict),
        KeyFunc(key='[更新]', func=update_entrance),
        KeyFunc(key='[传文件]', func=scp_entrance),
        KeyFunc(key='[退出程序]', func=None),
    ]
    loop_exe(map_list)
